<template>
    <div class="wrapper">
        <Logo />
        <Button :children="buttonRef" @button-click="handleClick"/>
    </div>
    <div class="popup" v-if="isShow" @click="handleClick">功能没做,点了没用,点我或按钮我就消失了</div>
</template>
<script setup>
import Logo from './logo.vue'
import Button from './Button.vue'
import { ref } from 'vue'

const buttonRef = ref("Order Now")
const isShow = ref(false)

const handleClick = () => {
    isShow.value = !isShow.value
}

</script>
<style scoped>
.wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.popup{
    z-index: 999;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 200px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    animation: popup 0.5s ease-in-out;
}
/* @keyframes popup {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
} */

</style>